#include <cstdio>

const int N = 21;
int a, b, c;
bool ans[N];
bool vis[N][N];

void dfs(int x, int y, int z) {
  if (vis[x][y] == true || x < 0 || y < 0 || x > a || y > b || z > c || z < 0) { return; }
  if (x == 0) ans[z] = true;
  vis[x][y] = true;
  dfs(a, y, z - a + x);
  dfs(a, y - a + x, z);
  dfs(x - b + y, b, z);
  dfs(x, b, z - b + y);
  dfs(x - c + z, y, c);
  dfs(x, y - c + z, c);

  dfs(0, y + x, z);
  dfs(0, y, z + x);
  dfs(x + y, 0, z);
  dfs(x, 0, z + y);
  dfs(x + z, y, 0);
  dfs(x, y + z, 0);
}
int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("MothersMilk.in", "r", stdin);
  freopen("MothersMilk.out", "w", stdout);
#endif
#endif

  scanf("%d%d%d", &a, &b, &c);
  dfs(0, 0, c);
  for (int i = 0; i < 21; ++i) {
    if (ans[i]) printf("%d ", i);
  }
  return 0;
}